package 初始化;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-06-29
 * Time: 9:38
 */
class F{
    public F() {
        System.out.println("父类构造方法");
    }
    {
        System.out.println("父类构造代码块");
    }
    static{
        System.out.println("父类静态代码块");
    }
}
class S extends F{
    public S() {
        super();
        System.out.println("子类构造方法");
    }
    {
        System.out.println("子类构造代码块");
    }
    static{
        System.out.println("子类静态代码块");
    }
}
public class Test {
    public static void main(String[] args) {
        S s = new S();
        System.out.println("===============");
        S s1 = new S();
    }
}
